1. Field of the Invention
The invention relates to an optimal correlation matching method and system for determining track behavior and, more particularly, to an optimal correlation matching method and system for determining track behavior on an optical mouse.
2. Description of Related Art
A typical optical mouse has an image sensor. The image sensor consists of a plurality of image sensing elements. Two sequential images sensed by the image sensor are applied for detecting a motion distance of the mouse. Typically, the detection uses a portion of the first image as a search block, thereby computing a correlation of the search block and a block that has same-size but different-location on the second image. Accordingly, a smallest absolute value is found as the motion distance.
FIG. 1 shows an example of images in which a motion of an optical mouse is detecting. In FIG. 1, a first image 130 and a second image 110 respectively have a size of 16×16 pixels, and a search block 120 has a size of 8×8 pixels, i.e., an 8×8 image on the center of the first image 130. The center of the 8×8 image is denoted by a cross ‘X’. As shown in FIG. 1, after being extracted, the search block is moved to different directions for computing the correlation with the second image 110. Since motion distance of an optical mouse is associated with the motion speed of the optical mouse operated by a user. The first image 130 is typically no more than 4 pixels different from the second image 110. Thus, when computing the correlation between the search block 120 and the second image 110, the center of the search block 120 is respectively located at each circle, as denoted by an ‘O’, of the second image 110 and accordingly the correlation between the search block 120 and the second image 110 is computed. Thus, in this case, eighty-one values C1-C81 are produced to represent the correlation between the search block 120 and the second image 110. Upon the eighty-one values C1-C81, a respective displacement point having the optimal correlation can be found to determine the motion distance.
However, such a process requires a large amount of computation. For example, as cited, the search block 120 is moved eighty-one times for computing the respective correlation to accordingly find the displacement point. Therefore, it is desirable to provide an improved method to mitigate and/or obviate the aforementioned problems.